tools/xend: Fix performance of xend with more than 10000 FC device paths
author"Dube, Lutz" <lutz.dube@ts.fujitsu.com>
Fri, 23 Jul 2010 16:34:35 +0000 (17:34 +0100)
committer"Dube, Lutz" <lutz.dube@ts.fujitsu.com>
Fri, 23 Jul 2010 16:34:35 +0000 (17:34 +0100)
commitc290fa1c4b7b280a26cbf742ab109fa2db2d10a3
tree99479d2fc8a495558245c1d2443ee86bd24f840e
parent2bdc928237ca74c5194d9487c21290eb8f1016c3
tools/xend: Fix performance of xend with more than 10000 FC device paths

On server startup xend start or a later xend restart needs approx. 30 min to
start/restart. Without attached FC devices xend start/restart needs only some
seconds.

server type: Fujitsu Primergy RX600-S5

The time gets lost in xen/xend/XendNode.py line 329 while calling
vscsi_util.get_all_scsi_device().

329         for pscsi_record in vscsi_util.get_all_scsi_devices():
330             scsi_id = pscsi_record['scsi_id']
331             if scsi_id:
332                 saved_HBA_uuid = None

I think, in most cases we don't need all the PSCSI devices registered in
xend, but only a few of it.
So a good solution for this perforamce issue is to scan only the SCSI device
paths we need, controlled by a new option in xend-config.sxp.

I have made a patch to allow specification of scsi devices we need in xend
in the config file xend-config.sxp.
The new options pscsi-device-mask expects a list of device ids oder partial
device ids like the option of lsscsi, e.g.
(pscsi-device-mask ('<partial-dev-id1' 'partial-dev-id2' ...))

Without this option set in xend-config.sxp or if lsscsi is not support, all
device paths are process like today.

Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com
Comment from Masaki Kanno <kanno.masaki@jp.fujitsu.com>: "Well done"
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/examples/xend-config.sxp
tools/python/xen/util/vscsi_util.py
tools/python/xen/xend/XendNode.py
tools/python/xen/xend/XendOptions.py